import request from '@/utils/request'

export function getAllReportforrepair(size, page) {
  return request({
    url: '/ReportForRepair/selectAll',
    method: 'get',
    params: {
      size: size,
      page: page
    }
  })
}

export function deleteReportforrepair(rrID) {
  return request({
    url: '/ReportForRepair/delete',
    method: 'delete',
    params: {
      rrID: rrID
    }
  })
}

export function updateReportforrepair(reportForRepair) {
  return request({
    url: '/ReportForRepair/update',
    method: 'put',
    params: {
      rrId: reportForRepair.rrId,
      userId: reportForRepair.userId,
      rrType: reportForRepair.rrType,
      rrContent: reportForRepair.rrContent,
      rrAddress: reportForRepair.rrAddress,
      rrState: reportForRepair.rrState
    }
  })
}

export function insertReportforrepair(reportForRepair) {
  return request({
    url: '/ReportForRepair/insert',
    method: 'post',
    data: {
      rrId: reportForRepair.rrId,
      userId: reportForRepair.userId,
      rrType: reportForRepair.rrType,
      rrContent: reportForRepair.rrContent,
      rrAddress: reportForRepair.rrAddress,
      rrState: reportForRepair.rrState
    }
  })
}
